package com.ysx.oa.clazz.service.serviceImpl;


import com.ysx.oa.clazz.bean.ClazzBean;
import com.ysx.oa.clazz.dao.ClazzDao;
import com.ysx.oa.clazz.service.ClazzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ClazzServiceImpl implements ClazzService{

    @Autowired
    private ClazzDao clazzDao;

    @Override
    public ClazzBean findById(Integer id) {
        ClazzBean clazzBean = new ClazzBean();
        clazzBean.setClazzId(id);

        return clazzDao.selectOne(clazzBean);
    }

    @Override
    public int add(ClazzBean bean) {
        return clazzDao.insert(bean) ;
    }
}
